package com.example.taxfloatproject20240926.ui.utils;

import android.content.Context;
import android.media.AudioManager;

/**
 * Created by gf on 15-3-18.
 */
public class MyAudioManager {

    public static void setVolume(Context context, int volume) {
        AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume,
                AudioManager.FLAG_PLAY_SOUND);
    }

    public static void getMaxVolume(Context context) {
        AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
        audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 100,
                AudioManager.FLAG_PLAY_SOUND);
    }

}
